package te2;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;



public class test2 {

	public static void main(String[] args) {
		DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		 String dStr = "2017-02-14 13:27:27";
			try {
				Date date = formatter.parse(dStr);
				Calendar calendar = Calendar.getInstance();
				calendar.setTimeInMillis(date.getTime());
				System.out.println(date.getTime() + " = " + formatter.format(calendar.getTime()));
			} catch (ParseException e) {
				e.printStackTrace();
			}
	}
	
}
